#!/bin/bash

FLY_NUM=5
FLY_NAME=iris

MR_NUM=0
MR_NAME=mr

echo "Launch simulation environment..."
roslaunch px4 indoor_cnbot.launch&

sleep 10

echo "Communicate with robots..."
vehicle_num=0
while(( $vehicle_num< $FLY_NUM))
do
    python ~/XTDrone/communication/multirotor_communication.py $FLY_NAME $vehicle_num&
    let "vehicle_num++"
done

sleep 3

echo "Use pose ground truth..."
python ~/XTDrone/sensing/pose_ground_truth/get_local_pose.py iris $FLY_NUM&

#sleep 3

#echo "Control robots..."
#gnome-terminal -e "python ~/XTDrone/control/keyboard/multirotor_keyboard_control.py $FLY_NAME $FLY_NUM vel"
